<html>
<head>
<title>表单智能设计器</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
<import type="css" file="css.workform" />
<script type="text/javascript">
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
self.focus();
function CheckForm()
{
	 if(EDIT_HTML.get_docHtml()=="")
	 { 
		 alert("表单内容不能为空！");
		 return (false);
	 }
	 return (true);
}


function send()
{
	 if(CheckForm())
	 {
	 if(EDIT_HTML.switchMode.checked == true)
	 {
		alert("源文件模式，不能保存！");
		return;
	 }
	 document.form1.CONTENT.value=EDIT_HTML.get_docHtml();
	 document.form1.submit();
	 }
}
function myclose()
{
	 msg='关闭表单设计器前，保存对表单的修改？';e
	 if(window.confirm(msg))
	 {
		 document.form1.CLOSE_FLAG.value="1";
		 send();
	 }
	 else
	 window.close();
}

function cool_textfield()
{
	URL="__URL__/textfield";
	loc_x=document.body.scrollLeft+event.clientX-event.offsetX-300;
	loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
	window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:140px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function cool_textarea()
{
	URL="__URL__/textarea";
	loc_x=document.body.scrollLeft+event.clientX-event.offsetX-300;
	loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
	window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:140px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function cool_listmenu()
{
	URL="__URL__/listmenu";
	loc_x=document.body.scrollLeft+event.clientX-event.offsetX-300;
	loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
	window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:293px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function cool_checkbox()
{
	URL="__URL__/checkbox";
	loc_x=document.body.scrollLeft+event.clientX-event.offsetX-300;
	loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
	window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:112px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function cool_calendar()
{
	URL="__URL__/calendar";
	loc_x=document.body.scrollLeft+event.clientX-event.offsetX-300;
	loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
	window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:112px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function cool_auto()
{
	URL="__URL__/auto";
	loc_x=document.body.scrollLeft+event.clientX-event.offsetX-300;
	loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
	window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:199px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function cool_calc()
{
	URL="__URL__/calc";
	loc_x=document.body.scrollLeft+event.clientX-event.offsetX-300;
	loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
	window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:172px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function cool_listview()
{
	URL="__URL__/listview";
	loc_x=document.body.scrollLeft+event.clientX-event.offsetX-300;
	loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
	window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:293px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function cool_hyperlink()
{
	URL="__URL__/hyperlink";
	loc_x=document.body.scrollLeft+event.clientX-event.offsetX-300;
	loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
	window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:85px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function cool_sign()
{
	URL="__URL__/sign";
	loc_x=document.body.scrollLeft+event.clientX-event.offsetX-300;
	loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
	window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:293px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
</script>
</head>
<body class="bodycolor" leftmargin="0" topmargin="0">
<table width="100%" height="100%" class="big" bgcolor="#000000" border=0 cellpadding="3" cellspacing="1" align="center">
 <tr bgcolor="#DDDDDD">
 <td class="TableHeader" colspan="2" height="20">
	<b>表单智能设计器</b>：<span class="small">首先，将网页设计工具或Word编辑好的表格框架粘贴到表单设计区。然后，创建表单控件。</span>
 </td>
 </tr>
 <tr bgcolor="#DDDDDD">
<td bgcolor="#DDDDDD" width="100%">
	 <iframe id="EDIT_HTML" style="BACKGROUND-COLOR: buttonface" src="__PUBLIC__/rte" width="100%" height="100%" type="text/x-scriptlet" VIEWASTEXT></iframe>
 </td>
 <td valign="top" align="center">
	 <table width="120" border="0" cellspacing="1" class="small" bgcolor="#000000" cellpadding="3" align="center">
		<tr class="TableHeader"><td align="center">表单控件</td></tr>
		<tr class="TableHeader"><td align="center"><button style="width:120;text-Align:left" onclick="cool_textfield();"><img src="__PUBLIC__/images/form/textfield.gif" align=absmiddle>单行输入框</button></td></tr>
		<tr class="TableHeader"><td align="center"><button style="width:120;text-Align:left" onclick="cool_textarea();"><img src="__PUBLIC__/images/form/textarea.gif" align=absmiddle>多行输入框</button></td></tr>
		<tr class="TableHeader"><td align="center"><button style="width:120;text-Align:left" onclick="cool_listmenu();"><img src="__PUBLIC__/images/form/listmenu.gif" align=absmiddle>下拉菜单</button></td></tr>
		<tr class="TableHeader"><td align="center"><button style="width:120;text-Align:left" onclick="cool_checkbox();"><img src="__PUBLIC__/images/form/checkbox.gif" align=absmiddle>选择框</button></td></tr>
		<tr class="TableHeader"><td align="center"><button style="width:120;text-Align:left" onclick="cool_listview();"><img src="__PUBLIC__/images/form/listview.gif" align=absmiddle>列表控件</button></td></tr>
		<tr class="TableHeader"><td align="center"><button style="width:120;text-Align:left" onclick="cool_auto();"><img src="__PUBLIC__/images/form/auto.gif" align=absmiddle>宏控件</button></td></tr>
		<tr class="TableHeader"><td align="center"><button style="width:120;text-Align:left" onclick="cool_calendar();"><img src="__PUBLIC__/images/form/calendar.gif" align=absmiddle>日历控件</button></td></tr>
		<tr class="TableHeader"><td align="center"><button style="width:120;text-Align:left" onclick="cool_calc();"><img src="__PUBLIC__/images/form/calc.gif" align=absmiddle>计算控件</button></td></tr>
		<tr class="TableHeader"><td align="center"><button style="width:120;text-Align:left" onclick="cool_hyperlink();"><img src="__PUBLIC__/images/form/listview.gif" align=absmiddle>超链接控件</button></td></tr>
		<tr class="TableHeader"><td align="center"><button style="width:120;text-Align:left" onclick="cool_sign();"><img src="__PUBLIC__/images/form/calc.gif" align=absmiddle>审核控件</button></td></tr>
	 </table>
	 <br>
	 <table width="120" border="0" cellspacing="1" class="small" bgcolor="#000000" cellpadding="3" align="center">
		<tr class="TableHeader"><td align="center">保存与退出</td></tr>
		<form action="__URL__/flow_form_model_edit"  method="post" name="form1">
		<tr class="TableHeader"><td align="center"><button style="width:120;height:30;text-Align:center" onclick="send()"><b>保存表单</b></button></td></tr>
		<tr class="TableHeader"><td align="center"><button style="width:120;height:30;text-Align:center" onclick="myclose()"><b>关闭设计器</b></button></td></tr>
		<input id="mytest" type="hidden" name="CONTENT"  value="{$form_model}">
		<input type="hidden" name="CLOSE_FLAG"  value="">
		<input type="hidden" name="form_id"  value="{$form_id}">
		</form>
	</table>
 </td>
 </tr>
</table>

<div id="ttt">

</div>
</body>
</html>